<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('textbook_audios', function (Blueprint $table) {
            $table->id();
            $table->integer('category_id')->comment('单元id');
            $table->string('unit_name')->nullable()->comment('单元名称');
            $table->string('title')->nullable()->comment('歌曲标题');
            $table->string('original_singer')->nullable()->comment('原唱地址');
            $table->string('vocal_accompaniment')->nullable()->comment('伴唱地址');
            $table->longText('captions')->nullable()->comment('字幕');
            $table->string('video')->nullable()->comment('视频地址');
            $table->string('duration')->nullable()->comment('时长');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('textbook_audios');
    }
};
